package com.service;
import com.dao.StuMapper;
import com.pojo.Stu;
import java.util.List;

public class StuServiceImpl implements StuService {
    //service 层调用dao层，所以这里需要去组合dao层
    private StuMapper stuMapper;

    public void setStuMapper(StuMapper stuMapper) {
        this.stuMapper = stuMapper;
    }


    @Override
    public List<Stu> queryAllstu() {
        return stuMapper.queryAllstu();
    }
    @Override
    public int deleteByid(int id) {
        return stuMapper.deleteByid(id);
    }
    @Override
    public Stu queryByid(int id) {
        return stuMapper.queryByid(id);
    }

    @Override
    public int addstu(Stu stu) {
        return stuMapper.addstu(stu);
    }
    @Override
    public int updatestu(Stu stu) {
        return stuMapper.updatestu(stu);
    }

    @Override
    public List<Stu> queryByname(String name) {
        return stuMapper.queryByname(name);
    }

    @Override
    public List<Stu> queryBysid(int sid) {
        return stuMapper.queryBysid(sid);
    }

    @Override
    public List<Stu> queryBymajor(String major) {
        return stuMapper.queryBymajor(major);
    }
}
